<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>詳細信息</title>
    
<style type="text/css">
<!--
.pop {
	font-size: 12px;
	color: #333333;
	width: 450px;
}
.biankuang {
	font-size: 12px;
	text-decoration: none;
	border: 1px solid #009900;
}
.anniu {
	font-size: 12px;
	color: #FF6600;
	text-decoration: none;
}
-->
</style>
</head>
<body>
<?php
	@include('include/common.inc.php');	
	
	if($_POST['reback'])
	{
		$reback = $_POST['reback'];
		$date = date("Y-m-d H:i:s");
		$id = $_POST['con_id'];
		$qur= "UPDATE $TBL_CONSULT SET reback='$reback',retime='$date' where id=$id";	
	     mysql_query($qur) or die(mysql_error());
		 MyNotice("回復成功", 1, "../list.php");			 
	}
	
	$num = $_GET['id'];
	$mem_id = $_SESSION['mem_id'];
	$sel = "select * from $TBL_CONSULT where hou_num='$num' and mem_id='$mem_id'";
	$res = mysql_query($sel);
	$row = mysql_fetch_array($res);
	$query = "select * from $TBL_HOUSE where num='$num' and user_id='$mem_id'";
	$result = mysql_query($query);
	if(mysql_fetch_array($result))
	{
		$me =1;
	}	
?>

		    <div class="biankuang">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                    <td style="padding-left: 22px; padding-right: 22px; padding-top: 5px; padding-bottom: 22px;">
                        
                         <p><b> <font style=" color:#006600">問題咨詢</font></b><br>
                           <span ><?=$row['consult']?> </span><br><br>                          
                         </p>
                    </td>
                 </tr>
                <?php if($me==1){ ?>
                 <form action="#" method="post" style="border:0">
                  <tr>
                    <td style="padding-left: 12px;">
                         <p><b> <font style=" color:#006600">回復</font></b><br>
                         <textarea name="reback" rows="3" cols="30"><?=$row['reback']?></textarea>
                         </p>
                      <div align="center">
                        <input type="submit" value="回復">
                        <input type="hidden"  name="con_id" value="<?=$row['id']?>" >
                        <input type="button" onClick="try{top.GB_hide()}catch(e){window.close();}" value="關閉">
                      </div>
                  </td>
                  </tr>
                  <?php }else{ ?>
                   <tr>
                    <td style="padding-left: 22px;">                     
                      <span>回復信息：<font color="#FF0000"><?=$row['reback']?></font> </span><br><br>
                  <div align="center"><input type="button" onClick="try{top.GB_hide()}catch(e){window.close();}" value="關閉"></div>
                  </td>
                  </tr>                
                  <?php }?>
                 </tr>
          </table>
		  </div>
		  <br>
		  <br>
        </div>


</body>
</html>

